package com.applink.sell_proof.api;

import java.io.Serializable;
import java.util.HashMap;

public class MethodParams implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 6152076963376168324L;

	private Methods mName;
	private int mSize;
	private int mOffset = 0;
	private Object mInputData;
	private String mTag;
	private boolean mIs4Cache = false;

	public Object getInputData() {
		return mInputData;
	}

	public void setInputData(Object inputData) {
		mInputData = inputData;
	}

	public MethodParams(Methods method) {
		this.mName = method;
	}

	public MethodParams(Methods method, Object inputData) {
		this.mName = method;
		this.mInputData = inputData;
	}

	public MethodParams(Methods method, int offset, int size) {
		this.mName = method;
		this.mSize = size;
		this.mOffset = offset;
	}

	public MethodParams(Methods method, int offset, int size, Object inputData) {
		this.mName = method;
		this.mSize = size;
		this.mOffset = offset;
		this.mInputData = inputData;
	}

	public MethodParams(Methods method, int offset, int size, Object inputData,
			String tag) {
		this.mName = method;
		this.mSize = size;
		this.mOffset = offset;
		this.mInputData = inputData;
		this.mTag = tag;
	}

	public Methods getName() {
		return mName;
	}

	public int getSize() {
		return mSize;
	}

	public int getOffset() {
		return mOffset;
	}

	public String getTag() {
		return mTag;
	}

	public void setOnly4Cache(boolean cache) {
		mIs4Cache = cache;
	}

	public boolean isOnly4Cache() {
		return mIs4Cache;
	}

	private HashMap<String, Object> mHasMap = new HashMap<String, Object>();

	public void setTag(String name, Object value) {
		mHasMap.put(name, value);
	}

	public Object getTag(String name) {
		return mHasMap.get(name);
	}
}
